<template>
    <div>
        <el-container>
          <el-header>
            <div class="icon-size">
              <el-button icon="el-icon-s-unfold" @click="getmenu"></el-button>
            </div>
          </el-header>
          <el-main>
            <p>山东大徐上大号上开发教案设计番窠倒臼发货啦空间划分上开发山东科技购房款拉萨寄过来康师傅沙发靠萨拉</p>
            <p>adahskjfhkjahfkjdjsfhsajkhfkjashkjdfhkjsa</p>
            <p>山东大徐上大号上开发教案设计番窠倒臼发货啦空间划分上开发山东科技购房款拉萨寄过来康师傅沙发靠萨拉</p>
            <p>adahskjfhkjahfkjdjsfhsajkhfkjashkjdfhkjsa</p>
            <transition name="show">
            <MenuVue :show.sync="showFlag" style="position:absolute;right:10px;top:55px"></MenuVue>
            </transition>
            </el-main>
          <el-footer>Footer</el-footer>
        </el-container>
    </div>
</template>
<style scoped>
  .icon-size{
    font-size: 25px;
    float:right;
  }
  .el-header{
    padding: 1px 7px;
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 40px;
    height: 50px !important;
  }
  .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
    height: 100px !important;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
    overflow: hidden;
  }
   @keyframes show {
    0%{
      opacity: 0;
      right: -50%;
      }
    100%{
      opacity: 1;
      right: 0%;
            }
        }
   @keyframes hide {
    0% {
     opacity: 1;
     right: 0%;
          }
      100% {
      opacity: 0;
      right: -50%;
      }
      }
  .show-enter-active {
    animation: show 0.6s;
    }
  .show-leave-active {
    animation: hide 0.6s;
    }
  .show-enter, .show-leave-to {
    opacity: 0;
    }
</style>
<script>
import MenuVue from './menu.vue'
export default{
  name: 'home',
  methods: {
    open: function () {
      this.Notification({
        title: '提示',
        dangerouslyUseHTMLString: true,
        message: '<MenuVue></MenuVue>',
        duration: 0
      })
    },
    getmenu: function () {
      if (this.showFlag === true) {
        this.showFlag = false
      } else {
        this.showFlag = true
      }
    }
  },
  data () {
    return {
      showFlag: true
    }
  },
  components: {MenuVue}
}
</script>
